# -*- coding:utf-8 -*-
"""
Author：Administrator
Date:2021年09月28日
"""
import pandas as pd

data1 = pd.DataFrame({'姓名': ['张三', '张三', '王五'], '班级': ['1班', '2班', '1班'], '分数': [10, 20, 30]})
data2 = pd.DataFrame({'姓名': ['张三', '张三', '王五', '王五'], '班级': ['1班', '1班', '1班', '2班'], '分数': [40, 50, 60, 70]})
data3 = pd.merge(data1, data2, on=['姓名', '班级'], how = 'outer')

print(data1)
print('*'*30)
print(data2)
print('-'*30)

print(data3)
